* fix an actual bug found by Wimplicit-fallthrough=
* add comments for gcc wrt Wimplicit-fallthrough=
The real fix is the to add the attribute [[fallthrough]];
which was added in c++17.
gcc accepts this, but until c++17 there wasn't
a requirement to ignore unrecognized attributes, so we can
imagine a pre c++17 compiler might choke on it.
switch (res) {
case Z_NEED_DICT:
- res = Z_DATA_ERROR; /* and fall through */
+ res = Z_DATA_ERROR;
+ /* fallthrough */
case Z_DATA_ERROR:
case Z_MEM_ERROR:
(void)inflateEnd(&strm);
if (strcmp(cin, "1.0e25") == 0) {
break;
}
- /* !!! NO BREAK !!! */
+ /* fallthrough */
case WPT_cD_OFS + 1:
case WPT_cB_OFS + 6:
WAYPT_SET(wpt, temperature, atof(cin));
case 0xc: /* POI item (same structure as full) */
poi = 1;
- /* fall through: */
+ /* fallthrough */
case 0x2: /* Multi HZ item */
if (len < MULTI_HZ_ITEM_LEN) {
case 0x6: /* POI item (same structure as full) */
poi = 1;
- /* fall through: */
+ /* fallthrough */
case 0x4: /* full item */
if (len < FULL_ITEM_LEN) {
return 0; /* incomplete escape sequence */
}
/* pass-through next character */
+ /* fallthrough */
default:
if (*m != *s) {
garmin_fs_t* gmsd = garmin_fs_t::find(wpt);
buff = QString::asprintf(fmp.printfc.constData(), CSTR(garmin_fs_t::get_facility(gmsd, "")));
}
+ break;
case XT_EMAIL: {
garmin_fs_t* gmsd = garmin_fs_t::find(wpt);
buff = QString::asprintf(fmp.printfc.constData(), CSTR(garmin_fs_t::get_email(gmsd, "")));